package com.sky.mapper;


import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface DishFlavorMapper  {
    //与菜品联动,添加菜品的口味
    void addDishFlavor(List<DishFlavor> dishFlavors);

    //与菜品删除联动,删除菜品的口味
    void deleteDishFlavor(List<Long> list);

    //依据id获取口味
    List<DishFlavor> getById(Long id);

    @Delete("delete from dish_flavor where dish_id =#{id} ")
    void deleteDishFlavorByDishId(Long id);
}
